const vm = new Vue({
    el: '#main',
    data: {
        account: '',
        userName: '',
    },
    methods: {
        submit,
    },
});

function apiready() {
    main();

}

function main() {
    fxj.fixLayout();
}

async function submit() {
    if (vm.account !== '' && vm.userName !== '') {
        const close = fxj.dialog.loading();
        const res = await ajax({
            url: 'home/userCenter/accountManagement',
            data: {
                type: 1,
                truename: vm.userName,
                account: vm.account,
                account_type: 'ZFB',
            },
        });
        close();
        toast(res.msg);
        if (res.err === 0) {
            api.execScript({
                name: 'yollon_add',
                script: 'reqAccountList()',
            });
            setTimeout(() => {
                closeToWin('yollon_add');
            }, 1500);
        }
    }
}